-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add performance warning to RedisTemplate#keys() and RedisOperations#keys() Javadoc #3142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add performance warning to RedisTemplate#keys() and RedisOperations#keys() Javadoc #3142
Conversation
Signed-off-by: JavaNo0b <[email protected]>
2cd631b
to
23d1dd0
Compare
Care to move this documentation bit to |
Signed-off-by: JavaNo0b <[email protected]>
Thanks for the suggestion! |
Original Pull Request: #3142
Original Pull Request: #3142
Closes #3142 Signed-off-by: JavaNo0b <[email protected]>
Closes #3142 Signed-off-by: JavaNo0b <[email protected]>
Thank you for your contribution. That's merged, polished, and backported now. |
Description
This pull request updates the Javadoc of both
RedisTemplate#keys()
andRedisOperations#keys()
methods to include a performance warning regarding the use of theKEYS
command.The
KEYS
command performs a full scan of the Redis keyspace, which can severely impact performance in production environments.To avoid misuse, the updated Javadocs include a warning and recommend using
scan(ScanOptions)
as a safer alternative for large datasets.RedisTemplate#keys()
implementation method.RedisOperations#keys()
interface method.Note:
ReactiveRedisOperations#keys()
already contains a similar warning and did not require changes.Checklist
References
scan(ScanOptions)
alternative